package ArryProTest;

public class Demo {
    public static void main(String[] args) {
        emptest ept1 = new emptest(1,"百战牌键盘","BZ_001",99.21,0.9);
        emptest ept2 = new emptest(2,"键盘侠玩偶","WO_102",403.00,0.7);
        emptest ept3 = new emptest(3,"实战Java程序设计","BK_001",89.00,0.8);
        emptest ept4 = new emptest(4,"西装","GQ_XF_12",700.00,0.5);
        emptest ept5 = new emptest(5,"大米手机","DM_PH_13",900.00,0.3);
        emptest[] emps = new emptest[5];
        emps[0] = ept1;
        emps[1] = ept2;
        emps[2] = ept3;
        emps[3] = ept4;
        emps[4] = ept5;

        //遍历数组
        for (int i = 0; i < emps.length; i++) {
            System.out.println(emps[i]);
        }
        //嵌套循环遍历



    }
}
class emptest{
    private int id;
    private String name;
    private String xinghao;
    private Double jiage;
    private Double zhekou;
    public emptest(){}

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getXinghao() {
        return xinghao;
    }

    public void setXinghao(String xinghao) {
        this.xinghao = xinghao;
    }

    public Double getJiage() {
        return jiage;
    }

    public void setJiage(Double jiage) {
        this.jiage = jiage;
    }

    public Double getZhekou() {
        return zhekou;
    }

    public void setZhekou(Double zhekou) {
        this.zhekou = zhekou;
    }

    public emptest(int id, String name, String xinghao, Double jiage, Double zhekou) {
        this.id = id;
        this.name = name;
        this.xinghao = xinghao;
        this.jiage = jiage;
        this.zhekou = zhekou;
    }

    @Override
    public String toString() {
        return getId()+"\t"+getName()+"\t"+getXinghao()+"\t"+getJiage()+"\t"+getZhekou();
    }


}
